home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FAQSYS18.ZIP / FAQS.DAT / ROL-FORM.TXT / text0000.txt < prev   
Encoding:
Text File  |  1996-01-04  |  3.5 KB  |  107 lines

  1. In article <721@vercors.frec.bull.fr> frank@mapd.frec.bull.fr () writes:
  2. >Does anyone have the details of .ROL files used by AdLib and compatible
  3. >cards on PC? I need it for my Turbo C ROL editor...
  4. >Thanx.
  5.  
  6. OK. Here it is...
  7.  
  8.  
  9. From: holmes@mrx.webo.dg.com (Chris Holmes)
  10. Subject: Adlib .ROL file format
  11. Date: Wed, 26 Aug 92 12:04:43 GMT
  12.  
  13. I requested this a while back and got a couple of requests for a summary,
  14. so here goes:
  15.  
  16. Files containing note information (i.e. songs) are suffixed with ".ROL".
  17. ("File version" and "editing scale" are non-musical information used by Visual
  18. Composer (TM).)
  19.  
  20. Structure of .ROL files:
  21. __________________________________________________________________
  22.  
  23. fld #   size   type     description
  24.         (bytes)
  25.  
  26. 1       2       int     file version, major
  27. 2       2       int     file version, minor
  28. 3       40      char    unused
  29. 4       2       int     ticks per beat
  30. 5       2       int     beats per measure
  31. 6       2       int     editing scale (Y axis)
  32. 7       2       int     editing scale (X axis)
  33. 8       1       char    unused
  34. 9       1       char    0 = percussive mode
  35.                         1 = melodic mode
  36. 10      90      char    unused
  37. 11      38      char    filler
  38. 12      15      char    filler
  39. 13      4       float   basic tempo
  40.  
  41. Field 14 indicates the number of times to repeat fields 15 and 16:
  42.  
  43. 14      2       int     number of tempo events
  44. 15      2       int     time of events, in ticks
  45. 16      4       float   tempo multiplier (0.01 - 10.0)
  46.  
  47. The remaining fields (17 to 34) are to be repeated for each of 11 voices:
  48.  
  49. 17      15      char    filler
  50. 18      2       int     time (in ticks) of last note +1
  51.  
  52. Repeat the next two fields (19 and 20) while the summation of field 20 is
  53. less than the value of field 18:
  54.  
  55. 19      2       int     note number: 0 => silence
  56.                         from 12 to 107 => normal note (you must
  57.                         subtract 60 to obtain the correct value
  58.                         for the sound driver)
  59. 20      2       int     note duration, in ticks
  60. 21      15      char    filler
  61.  
  62. Field 22 indicates the number of times to repeat fields 23 to 26:
  63.  
  64. 22      2       int     number of instrument events
  65. 23      2       int     time of events, in ticks
  66. 24      9       char    instrument name
  67. 25      1       char    filler
  68. 26      2       int     unused
  69. 27      15      char    filler
  70.  
  71. Field 28 indicates the number of times to repeat fields 29 and 30:
  72.  
  73. 28      2       int     number of volume events
  74. 29      2       int     time of events, in ticks
  75. 30      4       float   volume multiplier (0.0 - 1.0)
  76. 31      15      char    filler
  77.  
  78. Field 32 indicates the number of times to repeat fields 33 and 34:
  79.  
  80. 32      2       int     number of pitch events
  81. 33      2       int     time of events, in ticks
  82. 34      4       float   pitch variation (0.0 - 2.0, nominal is 1.0)
  83.  
  84. Notes
  85. _____
  86.  
  87. Fields #1 and #2 should be set to 0 and 4 respectively. Field #10 should
  88. be filled with zeros.
  89.  
  90. PS:
  91. a 4 byte 'float' in the 80x86 family look like follows:
  92.  
  93. Sign   biased
  94. -bit  exponent  significant
  95.  31    30..23     22..0
  96.                ^
  97.                 `- here an implicite "1." is assumed
  98.                exponent bias = 127 (0x7F)
  99.  
  100. eg. 0.5 = 1* 2^(-1) ==> sign=0, exp=127-1, signif=(1.)0000000
  101.  
  102. 10987654 32109876 54321098 76543210
  103. 33222222 22221111 11111100 00000000
  104. 0         0000000 00000000 00000000
  105.  0111111 0
  106. -----------------------------------------------------------------
  107.